package com.liveinstars.api.facade;

import com.liveinstars.api.dto.*;
import com.onepiece.shipelves.common.Result;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 包含了需要登录和不需要登录的用户信息接口
 */
@FeignClient("account")
public interface ImUserCentreApi {



    @GetMapping("/account/imGetUserInfo")
    ImGetUserInfo imGetUserInfo(@RequestParam Long uid);


    @PostMapping("/account/batchImGetUserInfo")
    Result<List<ImGetUserInfo>> batchImGetUserInfo(@RequestBody BatchImGetUserReq batchImGetUserReq);

    @GetMapping("/accountopen/getUserInfo")
    Result<GetUserInfo> getUserInfo(@RequestParam Integer uid);


    @PostMapping("/accountopen/batchGetUserInfo")
    Result<List<GetUserInfo>> batchGetUserInfo(@RequestBody BatchGetUserReq batchImGetUserReq);

    @GetMapping("/accountopen/validToken")
    ImGetUserInfo validToken(@RequestParam String token, @RequestParam Long uid);


    @GetMapping("/account/user")
    Result<GetUserInfo> getMyInfo(@RequestHeader("uid") Integer userId);

    @GetMapping("/account/getUserInfoAndBind")
    Result<GetUserInfoAndBind> getUserInfoAndBind(@RequestHeader("uid") Integer userId);

    @GetMapping("/account/reportLocation")
    Result<Boolean> reportLocation(@RequestParam String location, @RequestHeader("uid") Integer userId);

}
